<template>
    <div>
        <turntableEdit v-if="modelName == 'turntable'"></turntableEdit>
        <luckyPoker v-if="modelName == 'flop'"></luckyPoker>
        <eggsEdit v-if="modelName == 'eggs'"></eggsEdit>
        <scratchCard v-if="modelName == 'scratchCard'"></scratchCard>
        <questionnaire v-if="modelName == 'questionnaire'"></questionnaire>
        <daily v-if="modelName == 'daily'"></daily>
        <quizPK v-if="modelName == 'guess'"></quizPK>
        <scratchable v-if="modelName == 'scratchable'"></scratchable>
        <prizeclaw v-if="modelName == 'prizeclaw'"></prizeclaw>
        <tournamentGuess v-if="modelName == 'tournamentguess'"></tournamentGuess>
        <bargain v-if="modelName == 'bargain'"></bargain>
        <survey v-if="modelName == 'survey'"></survey>
        <investigation v-if="modelName == 'investigation'"></investigation>
        <eggtwisting v-if="modelName == 'eggtwisting'"></eggtwisting>
    </div>
</template>
<script>
    import {param2Obj} from '@/utils/index'
    import turntableEdit from './templateComponent/turntable/turntableEdit'
    import luckyPoker from './templateComponent/luckyPoker/luckyPokerEdit'
    import eggsEdit from './templateComponent/eggsEdit/eggsEdit'
    import scratchCard from './templateComponent/scratchCard'
    import questionnaire from './templateComponent/questionnaire/questionnaire'
    import daily from './templateComponent/daily/daily'
    import quizPK from './templateComponent/quizPK/quizPK'
    import scratchable from './templateComponent/scratchable/scratchable'
    import prizeclaw from './templateComponent/prizeclaw/prizeclaw'
    import tournamentGuess from './templateComponent/tournamentGuess/tournamentGuess'
    import bargain from './templateComponent/bargain/bargain'
    import survey from './templateComponent/survey/survey'
    import investigation from './templateComponent/investigation/investigation'
    import eggtwisting from './templateComponent/eggtwisting/eggtwisting'

    export default {
        name: 'TemplateEdit',
        data() {
            return {
                modelName: ''
            }
        },
        mounted() {
            this.$nextTick(function () {
                this.modelName = param2Obj(window.location.href).type
                console.log(this.modelName)
            })
        },
        components: {
            turntableEdit,
            luckyPoker,
            eggsEdit,
            scratchCard,
            questionnaire,
            daily,
            quizPK,
            scratchable,
            prizeclaw,
            tournamentGuess,
            bargain,
            survey,
            investigation,
            eggtwisting
        }
    }
</script>
